using System.Text.Json;
using System.Text.Json.Serialization;

namespace Vin.WebApi.Tests.Converter;

public class TestConverter : JsonConverter<string?>
{
    public TestConverter()
    {
        
    }

    public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
    {
        return reader.GetString();
    }

    public override void Write(Utf8JsonWriter writer, string? value, JsonSerializerOptions options)
    {
        JsonSerializer.Serialize(writer, value, options);
    }
}